/*
 *接口编写处...
*如果接口需要做Action的权限验证，请在Action上使用属性
*如: [ApiActionPermission("productionbatchesview",Enums.ActionPermissionOptions.Search)]
 */
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Http;
using VolPro.Entity.DomainModels;
using SMes.DbMethod.IServices;
using System.Net.WebSockets;
using SMes.DbMethod.ViewModel;
using Autofac.Core;

namespace SMes.DbMethod.Controllers
{
    public partial class productionbatchesviewController
    {
        private readonly IproductionbatchesviewService _service;//访问业务代码
        private readonly IHttpContextAccessor _httpContextAccessor;

        [ActivatorUtilitiesConstructor]
        public productionbatchesviewController(
            IproductionbatchesviewService service,
            IHttpContextAccessor httpContextAccessor
        )
        : base(service)
        {
            _service = service;
            _httpContextAccessor = httpContextAccessor;
        }
        [Route("SetWorkBathStatusRemove"), HttpPost]
        public async Task<VolPro.Core.Utilities.WebResponseContent> SetWorkBathStatusRemove([FromBody] RemoveWorkBatchViewModel removeWorkBatchViewModel)
        {
           return await  _service.SetWorkBathStatusRemove(removeWorkBatchViewModel);
        }

        [Route("SetWorkBathStatus"), HttpPost]
        public async Task<VolPro.Core.Utilities.WebResponseContent> SetWorkBathStatus([FromBody] WorkBatchViewModel workBatchViewModel)
        {
            return await _service.SetWorkBathStatus(workBatchViewModel);
        }
    }
}
